import './assets/main.scss'

import { createApp } from 'vue'
import { createPinia } from 'pinia'
import 'element-plus/theme-chalk/dark/css-vars.css'
import '@/assets/hl_js.less'
import zhCn from 'element-plus/es/locale/lang/zh-cn' // lang i18n
import App from './App.vue'
import router from './router'
import ElementPlus from 'element-plus'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import 'element-plus/dist/index.css'
import '@/permission.js'
import Directive from '@/directives/index'

const app = createApp(App)

app.use(createPinia())
app.use(Directive)
app.use(router)
app.use(ElementPlus, { locale: zhCn })

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}

app.mount('#app')
